<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2019/10/8
  Time: 0:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>悠U</title>
    <!-- 引入bootstrap框架的样式文件 -->
    <link rel="stylesheet" href="${path}/plugins/bootstrap/css/bootstrap.css" type="text/css">

</head>

<body>
<%--文章内容--%>
<c:out value="${notesInfos}" escapeXml="false"/>

<%--<c:forEach items="${notesInfos}" var="n">--%>
    <%--<c:out value="${n.content}" escapeXml="false"/>--%>
    <%--&lt;%&ndash;<img src="${n.photo}" style="width: 680px;height: 510px;"/>&ndash;%&gt;--%>
<%--</c:forEach>--%>

<div style="text-align: center;margin-top: 20px;">
    <c:if test="${temp==1}">
        <a data-toggle="modal" data-target="#myModal">
            <font size="2px" color="red"><b>当前为收费文章,点击购买</b></font>
        </a>
    </c:if>
</div>

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">请确认订单信息:</h4>
            </div>
            <div class="modal-body">
                <form id="payForm" action="${path}/notePay/goAlipay" method="post">
                    <input type="hidden" name="notesId" value="${notes.id}"/>
                    <table class="paytable">
                        <tr>
                            <td>
                                文章名称: ${notes.title}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格: <font size="2px" color="red"><b>￥10000</b></font>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input class="paybutton" type="submit" value="前往支付宝进行支付">
                            </td>
                        </tr>
                    </table>
                </form>

            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
<script src="${path}/plugins/jquery/jquery.min.js"></script>
<!--引入bootstrap的js文件-->
<script src="${path}/plugins/bootstrap/js/bootstrap.js"></script>

</body>
</html>

